Attributes

  • Attributes attach metadata to code.

  • Attributes are implemented as classes.

[Serializable]
class Player
{
    public int health;
}
[Obsolete("Use NewMethod")]
void OldMethod() {}